package com.effective.java.chapter02;

import java.util.WeakHashMap;

public class DelExpiredObj07 {
    public static void main(String[] args) {
        Stack stack = new Stack();
        stack.push(2);
        System.out.println(stack.pop0());

        WeakHashMap whm = new WeakHashMap(2);
        String key = new String("01");
        whm.put(key, new Stack());
        System.out.println(whm.size());
        key = null;
        System.gc();
        System.out.println(whm.size());

    }
}
